package com.wangsd.web.coupon.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 公司表
 */

@Data
@Entity
@Table(name = "company")
@ApiModel(value = "商圈（公司）", description = "商圈（公司）")
public class Company implements Serializable {

    @ApiModelProperty(value = "id")
    /*mybatis plus 自增主键*/
    @TableId(type = IdType.AUTO)
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private Date createdTime;

    @ApiModelProperty(value = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updatedTime;

    @ApiModelProperty(value = "（逻辑删除）是否已删；0，未删，1，已删")
    @TableLogic
    @TableField(fill = FieldFill.INSERT)
    private Integer deleted;

    @ApiModelProperty(value = "商圈名称")
    private String name;

    @ApiModelProperty(value = "商圈地址")
    private String address;

    @ApiModelProperty(value = "公司名称")
    private String realName;

    @ApiModelProperty(value = "商圈电话号码")
    private String phone;

    @ApiModelProperty(value = "小程序appid")
    private String miniAppid;

    @ApiModelProperty(value = "小程序secret")
    private String miniSecret;

    @ApiModelProperty(value = "小程序Token")
    private String miniToken;

    @ApiModelProperty(value = "小程序AesKey")
    private String miniAesKey;

    @ApiModelProperty(value = "服务商id")
    private Long businessServiceId;

    @ApiModelProperty(value = "检索标识")
    private String code;

    @ApiModelProperty(value = "服务商名称")
    @Transient
    @TableField(exist = false)
    private String businessServiceName;


}
